﻿// JScript File

function ReportManager(userXml, reportFasade)
{
    this.fasade = reportFasade;
    this.serverManager = new ServerManager();    
    this.userXml = userXml;
    
    this.Report = function()
    {
        this.fasade.innerHTML = "";
        ShowWaitPanel(ReportManager_ProcessingPanelTitle, ReportManager_ProcessingPanelBody);
        window.setTimeout(this.ShowReReportButton, 60000);
        this.serverManager.GetReport(this.userXml);                
    }
    
    this.ShowReport = function(HTML)
    {    
        HideWaitPanel();
        this.fasade.innerHTML = HTML;
        ShowCloseButtons();
    }
    
    this.ShowReReportButton = function()
    {
        var btnReReport = document.getElementById('btnReReport');
        btnReReport.style.display = 'block';
    }
}



